"""
scrapy runspider x00200_sdau.py -o sdau02.jsonl
"""

import scrapy


class QuotesSpider(scrapy.Spider):
    name = "sdau"
    start_urls = [
        "https://www.sdau.edu.cn/7/list.htm",
    ]

    def parse(self, response):
        # for quote in response.css("div.quote"):
        #     yield {
        #         "author": quote.xpath("span/small/text()").get(),
        #         "text": quote.css("span.text::text").get(),
        #     }
        #
        # next_page = response.css('li.next a::attr("href")').get()
        # if next_page is not None:
        #     yield response.follow(next_page, self.parse)
        xparas = response.css('p.MsoNormalxxx')
        print(xparas)
        for xp in xparas:
            xspans = xp.css('span::text')
            print(xspans)
            for xtext in xspans:
                yield {
                    'text': xtext.get(),
                }
